Packages & Versions Used

R.version.string
## [1] "R version 4.0.2 (2020-06-22)"

Packages Used

# Table of packages
kable(table[-1,], format = "html", align = "c") %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"))
Package Title Maintainer Version URL
foreign Read Data Stored by ‘Minitab’, ‘S’, ‘SAS’, ‘SPSS’, ‘Stata’, ‘Systat’, ‘Weka’, ‘dBase’, … R Core Team <; 0.8-80 NA
outliers Tests for outliers Lukasz Komsta <; 0.14 http://www.r-project.org,
tidyverse Easily Install and Load the ‘Tidyverse’ Hadley Wickham <; 1.3.0 http://tidyverse.tidyverse.org,
knitr A General-Purpose Package for Dynamic Report Generation in R Yihui Xie <; 1.29 NA
psych Procedures for Psychological, Psychometric, and Personality Research William Revelle <; 2.0.7 NA
gvlma Global Validation of Linear Models Assumptions Elizabeth Slate <; 1.0.0.3 NA
car Companion to Applied Regression John Fox <; 3.0-9 https://r-forge.r-project.org/projects/car/,
ggplot2 Create Elegant Data Visualisations Using the Grammar of Graphics Thomas Lin Pedersen <; 3.3.2 http://ggplot2.tidyverse.org,
GGally Extension to ‘ggplot2’ Barret Schloerke <; 2.0.0 https://ggobi.github.io/ggally,
data.table Extension of data.frame Matt Dowle <; 1.13.0 http://r-datatable.com, https://Rdatatable.gitlab.io/data.table,
kableExtra Construct Complex Table with ‘kable’ and Pipe Syntax Hao Zhu <; 1.1.0 http://haozhu233.github.io/kableExtra/,
jtools Analysis and Presentation of Social Scientific Data Jacob A. Long <; 2.1.0 NA
ggstance Horizontal ‘ggplot2’ Components Lionel Henry <; 0.3.4 NA
huxtable Easily Create and Style Tables for LaTeX, HTML and Other Formats David Hugh-Jones <; 5.1.1 NA
NA NA NA NA NA
interactions Comprehensive, User-Friendly Toolkit for Probing Interactions Jacob A. Long <; 1.1.3 NA

Load data

data = read_csv('/Users/leighgoetschius/Box Sync/ThreatDep_Probtrack_Amygdala/Manuscript/Data&Analysis/ViolenceExposure_SocialDep_AmygdalPFCProbtrack_Data_100218_Final.csv')
## Parsed with column specification:
## cols(
##   .default = col_double(),
##   Reason = col_character(),
##   Hab_Subs = col_character()
## )
## See spec(...) for full column specifications.

In the data as it is right now, we’ve got all of the subjects with dMRI data, the violence/dep composites, and the subgroups based on the threat/dep composite scores.

Clean Data

Univariate (rather than multivariate) Outlier Method

Right hemisphere outliers

fit_R47 = lm(RAmy_BA47 ~ VE * Deprivation, data = data)
cutoff = 4/((nrow(data) - length(fit_R47$coefficients)-1))
plot(fit_R47, cook.levels=cutoff)

fit_R10 = lm(RAmy_BA10 ~ VE * Deprivation, data = data)
cutoff = 4/((nrow(data) - length(fit_R10$coefficients)-1))
plot(fit_R10, cook.levels=cutoff)

clean.data = data[-c(104, 108, 115, 116, 130, 151), ]

clean.data_all = data[-c(22, 38, 73, 104, 108, 115, 116, 130, 131, 144, 151), ]

Left hemisphere outliers

fit_L11 = lm(LAmy_BA11 ~ VE * Deprivation, data = data)
cutoff = 4/((nrow(data) - length(fit_L11$coefficients)-1))
plot(fit_L11, cook.levels=cutoff)

fit_L10 = lm(LAmy_BA10 ~ VE * Deprivation, data = data)
cutoff = 4/((nrow(data) - length(fit_L10$coefficients)-1))
plot(fit_L10, cook.levels=cutoff)

clean.dataL = data[-c(22, 38, 73, 116, 131, 144), ]

Right hemisphere regression models

Amygdala-BA47 model

# All of my covariates
summary(lm(RAmy_BA47 ~ VE * Deprivation + EthnoRace_C + EthnoRace_AA + Gender_0F_1M + RAmy_BA10 + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data=clean.data))
## 
## Call:
## lm(formula = RAmy_BA47 ~ VE * Deprivation + EthnoRace_C + EthnoRace_AA + 
##     Gender_0F_1M + RAmy_BA10 + Internalizing + pubc_mean + ALES_sum + 
##     cm1edu + m1b2, data = clean.data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.12858 -0.05172 -0.01624  0.05144  0.20952 
## 
## Coefficients:
##                  Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     0.1116331  0.0567353   1.968 0.050779 .  
## VE              0.0083691  0.0128228   0.653 0.514870    
## Deprivation     0.0191896  0.0137379   1.397 0.164328    
## EthnoRace_C     0.0146365  0.0225407   0.649 0.517019    
## EthnoRace_AA   -0.0188106  0.0178671  -1.053 0.293959    
## Gender_0F_1M    0.0060139  0.0145778   0.413 0.680479    
## RAmy_BA10       0.5200951  0.1395541   3.727 0.000266 ***
## Internalizing   0.0135273  0.0148590   0.910 0.363944    
## pubc_mean       0.0039379  0.0120704   0.326 0.744650    
## ALES_sum       -0.0011073  0.0011051  -1.002 0.317836    
## cm1edu         -0.0004614  0.0060109  -0.077 0.938911    
## m1b2           -0.0140689  0.0149198  -0.943 0.347067    
## VE:Deprivation -0.0373562  0.0151257  -2.470 0.014534 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.07242 on 166 degrees of freedom
##   (4 observations deleted due to missingness)
## Multiple R-squared:  0.1411, Adjusted R-squared:  0.07897 
## F-statistic: 2.272 on 12 and 166 DF,  p-value: 0.01078
# Preregistered covariates
summary(lm(RAmy_BA47 ~ VE * Deprivation + EthnoRace_C + EthnoRace_AA + Gender_0F_1M  + cm1edu + m1b2, data=clean.data))
## 
## Call:
## lm(formula = RAmy_BA47 ~ VE * Deprivation + EthnoRace_C + EthnoRace_AA + 
##     Gender_0F_1M + cm1edu + m1b2, data = clean.data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.11443 -0.05662 -0.02180  0.05229  0.22386 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     0.136754   0.035686   3.832 0.000179 ***
## VE              0.006516   0.013060   0.499 0.618488    
## Deprivation     0.023331   0.013921   1.676 0.095583 .  
## EthnoRace_C     0.017213   0.023215   0.741 0.459424    
## EthnoRace_AA   -0.006893   0.018206  -0.379 0.705458    
## Gender_0F_1M    0.003165   0.011571   0.274 0.784778    
## cm1edu         -0.002236   0.006120  -0.365 0.715224    
## m1b2           -0.015080   0.015380  -0.980 0.328249    
## VE:Deprivation -0.045068   0.015510  -2.906 0.004152 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.07492 on 170 degrees of freedom
##   (4 observations deleted due to missingness)
## Multiple R-squared:  0.05845,    Adjusted R-squared:  0.01414 
## F-statistic: 1.319 on 8 and 170 DF,  p-value: 0.237
# Not adjusting for RAmy_BA10
# All of my covariates
summary(lm(RAmy_BA47 ~ VE * Deprivation + EthnoRace_C + EthnoRace_AA + Gender_0F_1M  + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data=clean.data))
## 
## Call:
## lm(formula = RAmy_BA47 ~ VE * Deprivation + EthnoRace_C + EthnoRace_AA + 
##     Gender_0F_1M + Internalizing + pubc_mean + ALES_sum + cm1edu + 
##     m1b2, data = clean.data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.11937 -0.05567 -0.02096  0.05154  0.22100 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)   
## (Intercept)     0.143878   0.058195   2.472  0.01443 * 
## VE              0.009247   0.013306   0.695  0.48805   
## Deprivation     0.019851   0.014257   1.392  0.16567   
## EthnoRace_C     0.014463   0.023394   0.618  0.53726   
## EthnoRace_AA   -0.008562   0.018323  -0.467  0.64091   
## Gender_0F_1M    0.005922   0.015130   0.391  0.69597   
## Internalizing   0.016199   0.015404   1.052  0.29448   
## pubc_mean       0.003325   0.012526   0.265  0.79102   
## ALES_sum       -0.001339   0.001145  -1.169  0.24402   
## cm1edu         -0.003299   0.006188  -0.533  0.59466   
## m1b2           -0.016231   0.015473  -1.049  0.29570   
## VE:Deprivation -0.044704   0.015565  -2.872  0.00461 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.07516 on 167 degrees of freedom
##   (4 observations deleted due to missingness)
## Multiple R-squared:  0.0692, Adjusted R-squared:  0.007885 
## F-statistic: 1.129 on 11 and 167 DF,  p-value: 0.342
BA47_mod = (lm(RAmy_BA47 ~ VE * Deprivation + EthnoRace_C + EthnoRace_AA + Gender_0F_1M  + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data=clean.data))
onlycovs = (lm(RAmy_BA47 ~ EthnoRace_C + EthnoRace_AA + Gender_0F_1M  + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data=clean.data))
lm.beta(BA47_mod)
## Warning in b * sx: longer object length is not a multiple of shorter object
## length
##             VE    Deprivation    EthnoRace_C   EthnoRace_AA   Gender_0F_1M 
##     0.06546964     0.13340343     0.06662837    -0.05006855     0.03921545 
##  Internalizing      pubc_mean       ALES_sum         cm1edu           m1b2 
##     0.08863274     0.02572352    -0.09463714    -0.04502574    -0.08820782 
## VE:Deprivation 
##    -0.31650601
# No covariates included
no_cov = lm(RAmy_BA47 ~ VE * Deprivation, data=clean.data)
summary(lm(RAmy_BA47 ~ VE * Deprivation, data=clean.data))
## 
## Call:
## lm(formula = RAmy_BA47 ~ VE * Deprivation, data = clean.data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.10242 -0.05713 -0.01939  0.04961  0.22930 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     0.103768   0.005771  17.980  < 2e-16 ***
## VE              0.001060   0.012183   0.087  0.93076    
## Deprivation     0.020694   0.013462   1.537  0.12600    
## VE:Deprivation -0.038615   0.014649  -2.636  0.00913 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.07431 on 179 degrees of freedom
## Multiple R-squared:  0.03983,    Adjusted R-squared:  0.02374 
## F-statistic: 2.475 on 3 and 179 DF,  p-value: 0.06306
# Correlations between amygdala-BA47 probtrack and environmental composites.
cor.test(clean.data$RAmy_BA47, clean.data$VE)
## 
##  Pearson's product-moment correlation
## 
## data:  clean.data$RAmy_BA47 and clean.data$VE
## t = -0.19033, df = 181, p-value = 0.8493
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1588767  0.1311798
## sample estimates:
##         cor 
## -0.01414606
cor.test(clean.data$RAmy_BA47, clean.data$Deprivation)
## 
##  Pearson's product-moment correlation
## 
## data:  clean.data$RAmy_BA47 and clean.data$Deprivation
## t = 0.47278, df = 181, p-value = 0.6369
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.110500  0.179263
## sample estimates:
##        cor 
## 0.03511956
# Correlation between amyygdala-BA47 probtrack and amygdala activation to threat faces.
cor.test(clean.data$Ramy_0035, clean.data$RAmy_BA47)
## 
##  Pearson's product-moment correlation
## 
## data:  clean.data$Ramy_0035 and clean.data$RAmy_BA47
## t = -3.712, df = 150, p-value = 0.0002892
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.4294252 -0.1371882
## sample estimates:
##       cor 
## -0.290054
# Including covariates. 
summary(lm(Ramy_0035 ~ RAmy_BA47 + Internalizing + pubc_mean, data = clean.data))
## 
## Call:
## lm(formula = Ramy_0035 ~ RAmy_BA47 + Internalizing + pubc_mean, 
##     data = clean.data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.57781 -0.39097  0.03322  0.34232  1.93497 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    1.20961    0.30398   3.979 0.000108 ***
## RAmy_BA47     -2.64476    0.69467  -3.807 0.000205 ***
## Internalizing  0.18762    0.12282   1.528 0.128743    
## pubc_mean     -0.03291    0.09005  -0.365 0.715299    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.6428 on 148 degrees of freedom
##   (31 observations deleted due to missingness)
## Multiple R-squared:  0.09877,    Adjusted R-squared:  0.0805 
## F-statistic: 5.407 on 3 and 148 DF,  p-value: 0.001475
actmod1 = lm(Ramy_0035 ~ RAmy_BA47 + Internalizing + pubc_mean, data = clean.data)
lm.beta(actmod1)
##     RAmy_BA47 Internalizing     pubc_mean 
##   -0.29776239    0.11973725   -0.02858212
summary(lm(Ramy_0035 ~ RAmy_BA47 + EthnoRace_C + EthnoRace_AA + Gender_0F_1M + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data = clean.data))
## 
## Call:
## lm(formula = Ramy_0035 ~ RAmy_BA47 + EthnoRace_C + EthnoRace_AA + 
##     Gender_0F_1M + Internalizing + pubc_mean + ALES_sum + cm1edu + 
##     m1b2, data = clean.data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.53444 -0.38330  0.04329  0.35252  2.03119 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    0.61727    0.54665   1.129 0.260761    
## RAmy_BA47     -2.59122    0.70519  -3.674 0.000339 ***
## EthnoRace_C    0.02034    0.20578   0.099 0.921391    
## EthnoRace_AA   0.04680    0.16286   0.287 0.774288    
## Gender_0F_1M   0.18210    0.15019   1.212 0.227388    
## Internalizing  0.18179    0.14546   1.250 0.213471    
## pubc_mean      0.06690    0.11977   0.559 0.577370    
## ALES_sum       0.01712    0.01060   1.616 0.108392    
## cm1edu        -0.08734    0.05658  -1.544 0.124921    
## m1b2           0.08718    0.14604   0.597 0.551521    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.6427 on 139 degrees of freedom
##   (34 observations deleted due to missingness)
## Multiple R-squared:  0.1514, Adjusted R-squared:  0.09649 
## F-statistic: 2.756 on 9 and 139 DF,  p-value: 0.005382
RBA47_act_mod = lm(Ramy_0035 ~ RAmy_BA47 + EthnoRace_C + EthnoRace_AA + Gender_0F_1M + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data = clean.data)
lm.beta(RBA47_act_mod)
##     RAmy_BA47   EthnoRace_C  EthnoRace_AA  Gender_0F_1M Internalizing 
##   -0.29113279    0.01071021    0.03124486    0.13460849    0.11346563 
##     pubc_mean      ALES_sum        cm1edu          m1b2 
##    0.05786410    0.13877999   -0.13017061    0.05054025
# Plot association between amygdala-BA47 connectivity and amygdala activation to threat faces.
plot(clean.data$RAmy_BA47, clean.data$Ramy_0035, xlab = 'Amygdala-OFC White Matter Connectivity', ylab = 'Amygdala Activation', frame.plot = FALSE)
abline(lm(clean.data$Ramy_0035 ~ clean.data$RAmy_BA47))

# Check the correlation between amygdala-BA47 probtrack and amygdala activation to angry faces and to fearful faces.
cor.test(clean.data$RAmy_0011, clean.data$RAmy_BA47)
## 
##  Pearson's product-moment correlation
## 
## data:  clean.data$RAmy_0011 and clean.data$RAmy_BA47
## t = -2.6634, df = 150, p-value = 0.00858
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.35953783 -0.05516595
## sample estimates:
##        cor 
## -0.2125004
summary(lm(RAmy_0011 ~ RAmy_BA47, data = clean.data))
## 
## Call:
## lm(formula = RAmy_0011 ~ RAmy_BA47, data = clean.data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.18775 -0.23439 -0.01549  0.25184  0.92374 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.54245    0.05447   9.959  < 2e-16 ***
## RAmy_BA47   -1.14056    0.42823  -2.663  0.00858 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3971 on 150 degrees of freedom
##   (31 observations deleted due to missingness)
## Multiple R-squared:  0.04516,    Adjusted R-squared:  0.03879 
## F-statistic: 7.094 on 1 and 150 DF,  p-value: 0.00858
cor.test(clean.data$Ramy_0003, clean.data$RAmy_BA47)
## 
##  Pearson's product-moment correlation
## 
## data:  clean.data$Ramy_0003 and clean.data$RAmy_BA47
## t = -1.9561, df = 150, p-value = 0.05231
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.309155503  0.001521612
## sample estimates:
##        cor 
## -0.1577173
summary(lm(Ramy_0003 ~ RAmy_BA47, data = clean.data))
## 
## Call:
## lm(formula = Ramy_0003 ~ RAmy_BA47, data = clean.data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.32673 -0.22264 -0.00822  0.19260  1.33566 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.45027    0.05546   8.119 1.59e-13 ***
## RAmy_BA47   -0.85291    0.43602  -1.956   0.0523 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4044 on 150 degrees of freedom
##   (31 observations deleted due to missingness)
## Multiple R-squared:  0.02487,    Adjusted R-squared:  0.01837 
## F-statistic: 3.826 on 1 and 150 DF,  p-value: 0.05231
summary(lm(Ramy_0003 ~ RAmy_BA47 + Internalizing + pubc_mean, data = clean.data))
## 
## Call:
## lm(formula = Ramy_0003 ~ RAmy_BA47 + Internalizing + pubc_mean, 
##     data = clean.data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.35948 -0.23180 -0.02618  0.20078  1.27111 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    0.72460    0.19077   3.798 0.000212 ***
## RAmy_BA47     -0.86961    0.43596  -1.995 0.047913 *  
## Internalizing  0.06074    0.07708   0.788 0.431928    
## pubc_mean     -0.08454    0.05652  -1.496 0.136831    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4034 on 148 degrees of freedom
##   (31 observations deleted due to missingness)
## Multiple R-squared:  0.04243,    Adjusted R-squared:  0.02302 
## F-statistic: 2.186 on 3 and 148 DF,  p-value: 0.09211

Testing Residuals for Amygdala-BA47 model

mod = summary(lm(RAmy_BA47 ~ VE * Deprivation + EthnoRace_C + EthnoRace_AA + Gender_0F_1M + RAmy_BA10 + Internalizing + pubc_mean + ALES_sum, data=clean.data))
fitBA47 = lm(RAmy_BA47 ~ VE * Deprivation + EthnoRace_C + EthnoRace_AA + Gender_0F_1M + RAmy_BA10 + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data=clean.data)
fit_int = lm(RAmy_BA47 ~ VE * Deprivation, data = clean.data)
fit_prereg = lm(RAmy_BA47 ~ VE * Deprivation + EthnoRace_C + EthnoRace_AA + Gender_0F_1M + RAmy_BA10 + cm1edu + m1b2, data=clean.data)
# To get the beta weights
lm.beta(fitBA47)
## Warning in b * sx: longer object length is not a multiple of shorter object
## length
##             VE    Deprivation    EthnoRace_C   EthnoRace_AA   Gender_0F_1M 
##    0.059253261    0.128960058    0.067425997   -0.110001820    0.039820543 
##      RAmy_BA10  Internalizing      pubc_mean       ALES_sum         cm1edu 
##    0.281265469    0.074013282    0.030468099   -0.078266731   -0.006296673 
##           m1b2 VE:Deprivation 
##   -0.076457958   -0.264482541
lm.beta(fit_int)
## Warning in b * sx: longer object length is not a multiple of shorter object
## length
##             VE    Deprivation VE:Deprivation 
##    0.007518361    0.138282871   -0.273872284
lm.beta(fit_prereg)
## Warning in b * sx: longer object length is not a multiple of shorter object
## length
##             VE    Deprivation    EthnoRace_C   EthnoRace_AA   Gender_0F_1M 
##     0.04212513     0.14793806     0.07848330    -0.10257709     0.01907941 
##      RAmy_BA10         cm1edu           m1b2 VE:Deprivation 
##     0.28668864     0.00661693    -0.07090731    -0.26584321
plot(mod$residuals)

mean(mod$residuals) # the mean of the residuals are zero
## [1] -3.277231e-18
t.test(mod$residuals)
## 
##  One Sample t-test
## 
## data:  mod$residuals
## t = -6.3873e-16, df = 182, p-value = 1
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
##  -0.0101236  0.0101236
## sample estimates:
##     mean of x 
## -3.277231e-18
dwtest(fitBA47)
## 
##  Durbin-Watson test
## 
## data:  fitBA47
## DW = 1.918, p-value = 0.2667
## alternative hypothesis: true autocorrelation is greater than 0
cor.test(mod$residuals, clean.data$Deprivation*clean.data$VE)
## 
##  Pearson's product-moment correlation
## 
## data:  mod$residuals and clean.data$Deprivation * clean.data$VE
## t = 2.1481e-16, df = 181, p-value = 1
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1450566  0.1450566
## sample estimates:
##          cor 
## 1.596658e-17
par(family = 'serif')
qqnorm(mod$residuals, frame.plot = FALSE, main=NULL, cex.lab = 1.5, font.lab=2)

Parsing the interaction for RAmy_BA47

Calculating basic statistics to parse the interaction.

clean.data$`Social Deprivation` = clean.data$Deprivation

model = lm(RAmy_BA47 ~ VE * Deprivation, data = clean.data)
model2 = lm(clean.data$RAmy_BA47  ~ clean.data$Deprivation * clean.data$VE)

vcov(model)
##                  (Intercept)            VE   Deprivation VE:Deprivation
## (Intercept)     3.330648e-05  1.236356e-06  6.341440e-06  -2.517358e-05
## VE              1.236356e-06  1.484268e-04 -6.211801e-05  -3.870033e-05
## Deprivation     6.341440e-06 -6.211801e-05  1.812183e-04  -6.851916e-05
## VE:Deprivation -2.517358e-05 -3.870033e-05 -6.851916e-05   2.145924e-04
summary(model)
## 
## Call:
## lm(formula = RAmy_BA47 ~ VE * Deprivation, data = clean.data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.10242 -0.05713 -0.01939  0.04961  0.22930 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     0.103768   0.005771  17.980  < 2e-16 ***
## VE              0.001060   0.012183   0.087  0.93076    
## Deprivation     0.020694   0.013462   1.537  0.12600    
## VE:Deprivation -0.038615   0.014649  -2.636  0.00913 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.07431 on 179 degrees of freedom
## Multiple R-squared:  0.03983,    Adjusted R-squared:  0.02374 
## F-statistic: 2.475 on 3 and 179 DF,  p-value: 0.06306
vcov(model2)
##                                        (Intercept) clean.data$Deprivation
## (Intercept)                           3.330648e-05           6.341440e-06
## clean.data$Deprivation                6.341440e-06           1.812183e-04
## clean.data$VE                         1.236356e-06          -6.211801e-05
## clean.data$Deprivation:clean.data$VE -2.517358e-05          -6.851916e-05
##                                      clean.data$VE
## (Intercept)                           1.236356e-06
## clean.data$Deprivation               -6.211801e-05
## clean.data$VE                         1.484268e-04
## clean.data$Deprivation:clean.data$VE -3.870033e-05
##                                      clean.data$Deprivation:clean.data$VE
## (Intercept)                                                 -2.517358e-05
## clean.data$Deprivation                                      -6.851916e-05
## clean.data$VE                                               -3.870033e-05
## clean.data$Deprivation:clean.data$VE                         2.145924e-04
summary(model2)
## 
## Call:
## lm(formula = clean.data$RAmy_BA47 ~ clean.data$Deprivation * 
##     clean.data$VE)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.10242 -0.05713 -0.01939  0.04961  0.22930 
## 
## Coefficients:
##                                       Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                           0.103768   0.005771  17.980  < 2e-16 ***
## clean.data$Deprivation                0.020694   0.013462   1.537  0.12600    
## clean.data$VE                         0.001060   0.012183   0.087  0.93076    
## clean.data$Deprivation:clean.data$VE -0.038615   0.014649  -2.636  0.00913 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.07431 on 179 degrees of freedom
## Multiple R-squared:  0.03983,    Adjusted R-squared:  0.02374 
## F-statistic: 2.475 on 3 and 179 DF,  p-value: 0.06306
min(clean.data$VE)
## [1] -0.8200771
max(clean.data$VE)
## [1] 2.169539
mean(clean.data$VE)
## [1] 0.0384145
describe(clean.data$VE)
varsnmeansdmediantrimmedmadminmaxrangeskewkurtosisse
11830.03840.533-0.0283-0.01660.509-0.822.172.991.081.610.0394
max(clean.data$Deprivation)
## [1] 2.671064
min(clean.data$Deprivation)
## [1] -0.7646478
mean(clean.data$Deprivation)
## [1] 0.02860156
describe(clean.data$Deprivation)
varsnmeansdmediantrimmedmadminmaxrangeskewkurtosisse
11830.02860.503-0.0469-0.02530.405-0.7652.673.441.615.040.0372

Interaction plots/statistics from Preacher Website - http://www.quantpsy.org/interact/mlr2.htm

Preacher Output with Social Deprivation as Moderator

Your Input

X1 = -0.8200771 X2 = 2.169539 cv1 = -0.47 cv2 = 0.03 cv3 = 0.8 Intercept = 0.103768 X Slope = 0.00106 Z Slope = 0.020694 XZ Slope = -0.038615 df = 166 alpha = 0.05

Asymptotic (Co)variances

var(b0) 0.00003331 var(b1) 0.00014843 var(b2) 0.00018122 var(b3) 0.00021459 cov(b2,b0) 0.00000634 cov(b3,b1) -0.0000387

Region of Significance

Z at lower bound of region = -1.122 Z at upper bound of region = 0.7862 (simple slopes are significant outside this region.)

Simple Intercepts and Slopes at Conditional Values of Z

At Z = cv1… simple intercept = 0.094(0.0082), t=11.4569, p=0 simple slope = 0.0192(0.0152), t=1.2606, p=0.2092 At Z = cv2… simple intercept = 0.1044(0.0058), t=17.9421, p=0 simple slope = -0.0001(0.0121), t=-0.0081, p=0.9935 At Z = cv3… simple intercept = 0.1203(0.0126), t=9.5293, p=0 simple slope = -0.0298(0.015), t=-1.9939, p=0.0478

Simple Intercepts and Slopes at Region Boundaries

Lower Bound…
simple intercept = 0.0805(0.0157), t=5.1231, p=0 simple slope = 0.0444(0.0225), t=1.9743, p=0.05 Upper Bound…
simple intercept = 0.12(0.0125), t=9.6326, p=0 simple slope = -0.0293(0.0148), t=-1.9744, p=0.05

Points to Plot

Line for cv1: From {X=-0.8201, Y=0.0783} to {X=2.1695, Y=0.1357} Line for cv2: From {X=-0.8201, Y=0.1045} to {X=2.1695, Y=0.1042} Line for cv3: From {X=-0.8201, Y=0.1448} to {X=2.1695, Y=0.0556}

xx <- c(-0.8201,2.1695)   #  <-- change to alter plot dims
yy <- c(0.0378,0.1448)   #  <-- change to alter plot dims
leg <- c(-0.8201,0.0511)   #  <-- change to alter legend location
x <- c(-0.8201,2.1695)   #  <-- x-coords for lines
y1 <- c(0.0783,0.1357)
y2 <- c(0.1045,0.1042)
y3 <- c(0.1448,0.0556)
plot(xx,yy,type='n',font=2,font.lab=2,xlab='X',ylab='Y',main='MLR 2-Way Interaction Plot')
lines(x,y1,lwd=3,lty=1,col=1)
lines(x,y2,lwd=3,lty=5,col=2)
lines(x,y3,lwd=3,lty=6,col=3)
points(x,y1,col=1,pch=16)
points(x,y2,col=1,pch=16)
points(x,y3,col=1,pch=16)
legend(leg[1],leg[2],legend=c('CVz1(1)','CVz1(2)','CVz1(3)'),lwd=c(3,3,3),lty=c(1,5,6),col=c(1,2,3))

z1=-.7646  #supply lower bound for z
z2=2.671   #supply upper bound for z
z <- seq(z1,z2,length=1000)
fz <- c(z,z)
y1 <- (0.00106+-0.038615*z)+(1.9744*sqrt(0.0001484268+(2*z*-0.00003870033)+((z^2)*0.0002145924)))
y2 <- (0.00106+-0.038615*z)-(1.9744*sqrt(0.0001484268+(2*z*-0.00003870033)+((z^2)*0.0002145924)))
fy <- c(y1,y2)
fline <- (0.00106+-0.038615*z)
plot(fz,fy,type='p',pch='.',font=2,font.lab=2,col=2,xlab='Moderator',ylab='Simple Slope',main='Confidence Bands')
lines(z,fline)
f0 <- array(0,c(1000))
lines(z,f0,col=8)
abline(v=-1.122,col=4,lty=2)
abline(v=0.7862,col=4,lty=2)

interact_plot(model, pred = VE, modx = Deprivation, x.label = "Violence Exposure", y.label = "Amygdala-OFC White Matter Connectivity", legend.main = "Social Deprivation", modx.values="plus-minus",modx.labels = c("-1 Standard Deviation","+1 Standard Deviation"), plot.points = FALSE, colors = c("gray54","steelblue4"),line.thickness = 2, rug = TRUE, rug.sides = "bl") + geom_line(linetype=1, size=2) + theme_classic() + theme(text=element_text(size = 16, family="serif"))

interact_plot(model, pred = VE, modx = Deprivation, x.label = "Violence Exposure", y.label = "Amygdala-OFC White Matter Connectivity", legend.main = "Social Deprivation",modx.values="plus-minus",plot.points = FALSE, colors = c("forestgreen","steelblue4"),line.thickness = 2, rug = TRUE, rug.sides = "bl") + geom_line(linetype=1, size=2) + theme_classic() + theme(text=element_text(size = 16, family="sans")) 

interact_plot(model, pred = VE, modx = Deprivation, x.label = "Violence Exposure", y.label = "Amygdala-OFC White Matter Connectivity", legend.main = "Social Deprivation",modx.values="plus-minus",plot.points = TRUE, colors=c("Black","Red"), line.thickness = 2, point.alpha = 1, point.shape=TRUE,vary.lty = FALSE) + theme_classic() + theme(text=element_text(size = 16, family="serif"))

Preacher Output with Social Deprivation as Moderator

Your Input

X1 = -0.7646 X2 = 2.671 cv1 = -0.46 cv2 = 0.0384145 cv3 = 0.54 Intercept = 0.103768 X Slope = 0.020694 Z Slope = 0.00106 XZ Slope = -0.038615 df = 166 alpha = 0.05

Asymptotic (Co)variances

var(b0) 0.00003331 var(b1) 0.00018122 var(b2) 0.00014843 var(b3) 0.00021459 cov(b2,b0) 0.00000124 cov(b3,b1) -0.00006852

Region of Significance

Z at lower bound of region = -0.2291 Z at upper bound of region = 1.8545 (simple slopes are significant outside this region.)

Simple Intercepts and Slopes at Conditional Values of Z

At Z = cv1… simple intercept = 0.1033(0.008), t=12.953, p=0 simple slope = 0.0385(0.017), t=2.2596, p=0.0251 At Z = cv2… simple intercept = 0.1038(0.0058), t=17.9032, p=0 simple slope = 0.0192(0.0133), t=1.4469, p=0.1498 At Z = cv3… simple intercept = 0.1043(0.0088), t=11.8201, p=0 simple slope = -0.0002(0.013), t=-0.0121, p=0.9903

Simple Intercepts and Slopes at Region Boundaries

Lower Bound…
simple intercept = 0.1035(0.0064), t=16.2613, p=0 simple slope = 0.0295(0.015), t=1.9743, p=0.05 Upper Bound…
simple intercept = 0.1057(0.0234), t=4.5153, p=0 simple slope = -0.0509(0.0258), t=-1.9743, p=0.05

Points to Plot

Line for cv1: From {X=-0.7646, Y=0.0739} to {X=2.671, Y=0.206} Line for cv2: From {X=-0.7646, Y=0.0891} to {X=2.671, Y=0.1551} Line for cv3: From {X=-0.7646, Y=0.1045} to {X=2.671, Y=0.1039}

xx <- c(-0.7646,2.671)   #  <-- change to alter plot dims
yy <- c(0.0475,0.206)   #  <-- change to alter plot dims
leg <- c(-0.7646,0.0673)   #  <-- change to alter legend location
x <- c(-0.7646,2.671)   #  <-- x-coords for lines
y1 <- c(0.0739,0.206)
y2 <- c(0.0891,0.1551)
y3 <- c(0.1045,0.1039)
plot(xx,yy,type='n',font=2,font.lab=2,xlab='X',ylab='Y',main='MLR 2-Way Interaction Plot')
lines(x,y1,lwd=3,lty=1,col=1)
lines(x,y2,lwd=3,lty=5,col=2)
lines(x,y3,lwd=3,lty=6,col=3)
points(x,y1,col=1,pch=16)
points(x,y2,col=1,pch=16)
points(x,y3,col=1,pch=16)
legend(leg[1],leg[2],legend=c('CVz1(1)','CVz1(2)','CVz1(3)'),lwd=c(3,3,3),lty=c(1,5,6),col=c(1,2,3))

z1=-0.82  #supply lower bound for z
z2=2.17   #supply upper bound for z
z <- seq(z1,z2,length=1000)
fz <- c(z,z)
y1 <- (0.020694+-0.038615*z)+(1.9744*sqrt(0.0001812183+(2*z*-0.00006851916)+((z^2)*0.0002145924)))
y2 <- (0.020694+-0.038615*z)-(1.9744*sqrt(0.0001812183+(2*z*-0.00006851916)+((z^2)*0.0002145924)))
fy <- c(y1,y2)
fline <- (0.020694+-0.038615*z)
plot(fz,fy,type='p',pch='.',font=2,font.lab=2,col=2,xlab='Moderator',ylab='Simple Slope',main='Confidence Bands')
lines(z,fline)
f0 <- array(0,c(1000))
lines(z,f0,col=8)
abline(v=-0.2291,col=4,lty=2)
abline(v=1.8545,col=4,lty=2)

Plotting White Matter - Amygdala Activation Association for BA47

par(family = 'serif')
plot(clean.data$RAmy_BA47, clean.data$Ramy_0035, frame.plot = FALSE,  main=NULL, cex.lab = 1.5, font.lab=2, xlab = "Amygdala-OFC White Matter Connectivity", ylab = "Amygdala Activation to Threat Faces", pch=16)

Example presentation figure

clean.data %>% 
  ggplot(aes(x=RAmy_BA47, y=Ramy_0035)) +
  geom_point(color="palegreen", size=2) +
  labs(x="Amygdala-OFC White Matter Connectivity", y="Amygdala Reactivity", color="white") +
  theme(plot.background = element_rect(fill="black", colour = "black"),
        panel.background = element_rect(fill="black"),
        panel.grid.major = element_blank(),
        panel.grid.minor = element_blank(),
        axis.title = element_text(colour="white", size = 25),
        axis.ticks = element_line(colour="white"),
        axis.text = element_text(colour="white"),
        axis.line = element_line(colour = "white"))
## Warning: Removed 31 rows containing missing values (geom_point).

Amygdala-BA10 model

# All of my covariates
summary(lm(RAmy_BA10 ~ VE * Deprivation + RAmy_BA47 + EthnoRace_AA + EthnoRace_C + Gender_0F_1M  + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data=clean.data))
## 
## Call:
## lm(formula = RAmy_BA10 ~ VE * Deprivation + RAmy_BA47 + EthnoRace_AA + 
##     EthnoRace_C + Gender_0F_1M + Internalizing + pubc_mean + 
##     ALES_sum + cm1edu + m1b2, data = clean.data)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.053192 -0.029054 -0.005352  0.016847  0.124212 
## 
## Coefficients:
##                  Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     0.0406384  0.0305004   1.332 0.184558    
## VE              0.0003154  0.0068595   0.046 0.963379    
## Deprivation    -0.0016757  0.0073815  -0.227 0.820698    
## RAmy_BA47       0.1484542  0.0398338   3.727 0.000266 ***
## EthnoRace_AA    0.0209766  0.0094382   2.223 0.027598 *  
## EthnoRace_C    -0.0024801  0.0120564  -0.206 0.837274    
## Gender_0F_1M   -0.0010549  0.0077919  -0.135 0.892470    
## Internalizing   0.0027326  0.0079556   0.343 0.731668    
## pubc_mean      -0.0016726  0.0064495  -0.259 0.795694    
## ALES_sum       -0.0002465  0.0005919  -0.417 0.677570    
## cm1edu         -0.0049664  0.0031882  -1.558 0.121203    
## m1b2           -0.0017475  0.0079913  -0.219 0.827169    
## VE:Deprivation -0.0074915  0.0082077  -0.913 0.362698    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.03869 on 166 degrees of freedom
##   (4 observations deleted due to missingness)
## Multiple R-squared:  0.1617, Adjusted R-squared:  0.1011 
## F-statistic: 2.668 on 12 and 166 DF,  p-value: 0.00266
# Not adjusting for RAmy_BA47
# All of my covariates
summary(lm(RAmy_BA10 ~ VE * Deprivation + EthnoRace_AA + EthnoRace_C + Gender_0F_1M  + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data=clean.data))
## 
## Call:
## lm(formula = RAmy_BA10 ~ VE * Deprivation + EthnoRace_AA + EthnoRace_C + 
##     Gender_0F_1M + Internalizing + pubc_mean + ALES_sum + cm1edu + 
##     m1b2, data = clean.data)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.058827 -0.031378 -0.009747  0.016993  0.123887 
## 
## Coefficients:
##                  Estimate Std. Error t value Pr(>|t|)  
## (Intercept)     0.0619976  0.0310916   1.994   0.0478 *
## VE              0.0016882  0.0071090   0.237   0.8126  
## Deprivation     0.0012713  0.0076170   0.167   0.8677  
## EthnoRace_AA    0.0197056  0.0097892   2.013   0.0457 *
## EthnoRace_C    -0.0003329  0.0124987  -0.027   0.9788  
## Gender_0F_1M   -0.0001757  0.0080833  -0.022   0.9827  
## Internalizing   0.0051375  0.0082297   0.624   0.5333  
## pubc_mean      -0.0011791  0.0066924  -0.176   0.8604  
## ALES_sum       -0.0004453  0.0006118  -0.728   0.4677  
## cm1edu         -0.0054562  0.0033062  -1.650   0.1008  
## m1b2           -0.0041571  0.0082667  -0.503   0.6157  
## VE:Deprivation -0.0141280  0.0083156  -1.699   0.0912 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.04015 on 167 degrees of freedom
##   (4 observations deleted due to missingness)
## Multiple R-squared:  0.09155,    Adjusted R-squared:  0.03171 
## F-statistic:  1.53 on 11 and 167 DF,  p-value: 0.1249
# No covariates
summary(lm(RAmy_BA10 ~ VE * Deprivation, data = clean.data))
## 
## Call:
## lm(formula = RAmy_BA10 ~ VE * Deprivation, data = clean.data)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.052020 -0.033268 -0.009264  0.023304  0.124582 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     0.050212   0.003184  15.772   <2e-16 ***
## VE              0.005649   0.006721   0.841    0.402    
## Deprivation     0.006325   0.007426   0.852    0.396    
## VE:Deprivation -0.020776   0.008081  -2.571    0.011 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.041 on 179 degrees of freedom
## Multiple R-squared:  0.03612,    Adjusted R-squared:  0.01996 
## F-statistic: 2.236 on 3 and 179 DF,  p-value: 0.0857
# Correlation between amyygdala-BA10 probtrack and amygdala activation to threat faces.
cor.test(clean.data$Ramy_0035, clean.data$RAmy_BA10)
## 
##  Pearson's product-moment correlation
## 
## data:  clean.data$Ramy_0035 and clean.data$RAmy_BA10
## t = -2.5913, df = 150, p-value = 0.01051
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.35451431 -0.04942427
## sample estimates:
##        cor 
## -0.2069962
cor.test(clean.data$Ramy_0003, clean.data$RAmy_BA10)
## 
##  Pearson's product-moment correlation
## 
## data:  clean.data$Ramy_0003 and clean.data$RAmy_BA10
## t = -2.0829, df = 150, p-value = 0.03896
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.318363596 -0.008691851
## sample estimates:
##        cor 
## -0.1676606
cor.test(clean.data$RAmy_0011, clean.data$RAmy_BA10)
## 
##  Pearson's product-moment correlation
## 
## data:  clean.data$RAmy_0011 and clean.data$RAmy_BA10
## t = -2.3473, df = 150, p-value = 0.02022
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.33732032 -0.02992375
## sample estimates:
##        cor 
## -0.1882278
summary(lm(RAmy_0011 ~ RAmy_BA10, data = clean.data))
## 
## Call:
## lm(formula = RAmy_0011 ~ RAmy_BA10, data = clean.data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.10669 -0.22345 -0.01279  0.23598  0.94944 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.51278    0.04931  10.398   <2e-16 ***
## RAmy_BA10   -1.86684    0.79532  -2.347   0.0202 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3991 on 150 degrees of freedom
##   (31 observations deleted due to missingness)
## Multiple R-squared:  0.03543,    Adjusted R-squared:  0.029 
## F-statistic:  5.51 on 1 and 150 DF,  p-value: 0.02022
summary(lm(Ramy_0003 ~ RAmy_BA10, data = clean.data))
## 
## Call:
## lm(formula = Ramy_0003 ~ RAmy_BA10, data = clean.data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.29170 -0.22899 -0.02281  0.22370  1.34640 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.44114    0.04987   8.845 2.33e-15 ***
## RAmy_BA10   -1.67540    0.80436  -2.083    0.039 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4037 on 150 degrees of freedom
##   (31 observations deleted due to missingness)
## Multiple R-squared:  0.02811,    Adjusted R-squared:  0.02163 
## F-statistic: 4.338 on 1 and 150 DF,  p-value: 0.03896
# Including covariates. 
summary(lm(Ramy_0035 ~ RAmy_BA10 +  Internalizing + pubc_mean, data = clean.data))
## 
## Call:
## lm(formula = Ramy_0035 ~ RAmy_BA10 + Internalizing + pubc_mean, 
##     data = clean.data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.8839 -0.3438 -0.0134  0.3413  1.9457 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    1.12478    0.31059   3.621 0.000402 ***
## RAmy_BA10     -3.46554    1.31250  -2.640 0.009169 ** 
## Internalizing  0.16775    0.12556   1.336 0.183597    
## pubc_mean     -0.04034    0.09224  -0.437 0.662457    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.6582 on 148 degrees of freedom
##   (31 observations deleted due to missingness)
## Multiple R-squared:  0.05502,    Adjusted R-squared:  0.03586 
## F-statistic: 2.872 on 3 and 148 DF,  p-value: 0.03838
actmod2 = lm(Ramy_0035 ~ RAmy_BA10 +  Internalizing + pubc_mean, data = clean.data)
lm.beta(actmod2)
##     RAmy_BA10 Internalizing     pubc_mean 
##   -0.21115053    0.10705551   -0.03503934
summary(lm(Ramy_0035 ~ RAmy_BA10 + EthnoRace_C + EthnoRace_AA + Gender_0F_1M + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data = clean.data))
## 
## Call:
## lm(formula = Ramy_0035 ~ RAmy_BA10 + EthnoRace_C + EthnoRace_AA + 
##     Gender_0F_1M + Internalizing + pubc_mean + ALES_sum + cm1edu + 
##     m1b2, data = clean.data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.80557 -0.36918  0.01096  0.33275  2.08432 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)   
## (Intercept)    0.465308   0.549225   0.847  0.39834   
## RAmy_BA10     -4.214961   1.364128  -3.090  0.00242 **
## EthnoRace_C   -0.002073   0.208587  -0.010  0.99209   
## EthnoRace_AA   0.103482   0.167135   0.619  0.53683   
## Gender_0F_1M   0.161582   0.151980   1.063  0.28954   
## Internalizing  0.138989   0.146566   0.948  0.34462   
## pubc_mean      0.046589   0.121293   0.384  0.70149   
## ALES_sum       0.020123   0.010681   1.884  0.06165 . 
## cm1edu        -0.094702   0.057615  -1.644  0.10250   
## m1b2           0.145896   0.147381   0.990  0.32393   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.6512 on 139 degrees of freedom
##   (34 observations deleted due to missingness)
## Multiple R-squared:  0.1288, Adjusted R-squared:  0.07243 
## F-statistic: 2.284 on 9 and 139 DF,  p-value: 0.02022
RBA10_act_mod = lm(Ramy_0035 ~ RAmy_BA10 + EthnoRace_C + EthnoRace_AA + Gender_0F_1M + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data = clean.data)
lm.beta(RBA10_act_mod)
##     RAmy_BA10   EthnoRace_C  EthnoRace_AA  Gender_0F_1M Internalizing 
##  -0.255566513  -0.001091307   0.069093890   0.119438883   0.086750104 
##     pubc_mean      ALES_sum        cm1edu          m1b2 
##   0.040297079   0.163073476  -0.141144444   0.084580538

Testing Residuals for Amygdala-BA10 model

mod1 = summary(lm(RAmy_BA10 ~ VE * Deprivation + EthnoRace_AA+ EthnoRace_C + Gender_0F_1M + RAmy_BA47 + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data=clean.data))
mod10 = lm(RAmy_BA10 ~ VE * Deprivation + EthnoRace_AA+ EthnoRace_C + Gender_0F_1M + RAmy_BA47 + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data=clean.data)

mod_int = lm(RAmy_BA10 ~ VE * Deprivation, data = clean.data)
summary(mod_int)
## 
## Call:
## lm(formula = RAmy_BA10 ~ VE * Deprivation, data = clean.data)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.052020 -0.033268 -0.009264  0.023304  0.124582 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     0.050212   0.003184  15.772   <2e-16 ***
## VE              0.005649   0.006721   0.841    0.402    
## Deprivation     0.006325   0.007426   0.852    0.396    
## VE:Deprivation -0.020776   0.008081  -2.571    0.011 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.041 on 179 degrees of freedom
## Multiple R-squared:  0.03612,    Adjusted R-squared:  0.01996 
## F-statistic: 2.236 on 3 and 179 DF,  p-value: 0.0857
plot(mod1$residuals)

Just a fun plot of what the RAmy_BA10 interaction looks like before covariates – it seems to look really similar to the RAmy-BA47 interaction. That’s a fun sanity check.

interact_plot(mod_int, pred = VE, modx = Deprivation, data = clean.data, modx.values = 'plus-minus')

Left hemisphere models

Amygdala-BA10 model

# Including all covariates
summary(lm(LAmy_BA10 ~ VE * Deprivation + EthnoRace_AA+ EthnoRace_C + Gender_0F_1M + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data=clean.data))
## 
## Call:
## lm(formula = LAmy_BA10 ~ VE * Deprivation + EthnoRace_AA + EthnoRace_C + 
##     Gender_0F_1M + Internalizing + pubc_mean + ALES_sum + cm1edu + 
##     m1b2, data = clean.data)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.021019 -0.010590 -0.006569  0.001712  0.107485 
## 
## Coefficients:
##                  Estimate Std. Error t value Pr(>|t|)  
## (Intercept)     0.0155140  0.0152900   1.015   0.3117  
## VE             -0.0021493  0.0034960  -0.615   0.5395  
## Deprivation     0.0094716  0.0037458   2.529   0.0124 *
## EthnoRace_AA    0.0010742  0.0048141   0.223   0.8237  
## EthnoRace_C    -0.0006893  0.0061465  -0.112   0.9108  
## Gender_0F_1M   -0.0009943  0.0039752  -0.250   0.8028  
## Internalizing   0.0051385  0.0040471   1.270   0.2060  
## pubc_mean      -0.0004491  0.0032911  -0.136   0.8916  
## ALES_sum       -0.0001549  0.0003009  -0.515   0.6073  
## cm1edu          0.0010816  0.0016259   0.665   0.5068  
## m1b2           -0.0014343  0.0040654  -0.353   0.7247  
## VE:Deprivation -0.0060425  0.0040894  -1.478   0.1414  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.01975 on 167 degrees of freedom
##   (4 observations deleted due to missingness)
## Multiple R-squared:  0.06597,    Adjusted R-squared:  0.004442 
## F-statistic: 1.072 on 11 and 167 DF,  p-value: 0.3866
# No covariates
summary(lm(LAmy_BA10 ~ VE * Deprivation, data = clean.dataL))
## 
## Call:
## lm(formula = LAmy_BA10 ~ VE * Deprivation, data = clean.dataL)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.011388 -0.008976 -0.006239  0.002917  0.069315 
## 
## Coefficients:
##                  Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     1.085e-02  1.212e-03   8.958 4.24e-16 ***
## VE              3.945e-05  2.575e-03   0.015    0.988    
## Deprivation     1.042e-03  3.036e-03   0.343    0.732    
## VE:Deprivation -4.285e-03  3.031e-03  -1.414    0.159    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.01557 on 179 degrees of freedom
## Multiple R-squared:  0.01196,    Adjusted R-squared:  -0.004596 
## F-statistic: 0.7225 on 3 and 179 DF,  p-value: 0.5398
# Association between amygdala-BA10 and amygdala activation to threat faces.
cor.test(clean.dataL$Lamy_0035, clean.dataL$LAmy_BA10)
## 
##  Pearson's product-moment correlation
## 
## data:  clean.dataL$Lamy_0035 and clean.dataL$LAmy_BA10
## t = -3.9734, df = 151, p-value = 0.0001094
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.4446393 -0.1566375
## sample estimates:
##        cor 
## -0.3076685
# Including covariates.
summary(lm(Lamy_0035 ~ LAmy_BA10 + Internalizing + pubc_mean, data = clean.dataL))
## 
## Call:
## lm(formula = Lamy_0035 ~ LAmy_BA10 + Internalizing + pubc_mean, 
##     data = clean.dataL)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.54665 -0.37617 -0.06264  0.31400  1.37916 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     1.03211    0.25861   3.991 0.000103 ***
## LAmy_BA10     -12.65472    3.03595  -4.168 5.18e-05 ***
## Internalizing   0.19112    0.10908   1.752 0.081811 .  
## pubc_mean      -0.03754    0.07794  -0.482 0.630746    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5634 on 149 degrees of freedom
##   (30 observations deleted due to missingness)
## Multiple R-squared:  0.1138, Adjusted R-squared:  0.09597 
## F-statistic: 6.379 on 3 and 149 DF,  p-value: 0.0004269
actmod3 = lm(Lamy_0035 ~ LAmy_BA10 + Internalizing + pubc_mean, data = clean.dataL)
lm.beta(actmod3)
##     LAmy_BA10 Internalizing     pubc_mean 
##    -0.3243390     0.1364928    -0.0372194
summary(lm(Lamy_0035 ~ LAmy_BA10 + EthnoRace_AA + EthnoRace_C + Gender_0F_1M  + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data = clean.dataL))
## 
## Call:
## lm(formula = Lamy_0035 ~ LAmy_BA10 + EthnoRace_AA + EthnoRace_C + 
##     Gender_0F_1M + Internalizing + pubc_mean + ALES_sum + cm1edu + 
##     m1b2, data = clean.dataL)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.42218 -0.38257 -0.01476  0.28558  1.43171 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     0.704643   0.475121   1.483    0.140    
## LAmy_BA10     -12.748139   3.160210  -4.034 8.98e-05 ***
## EthnoRace_AA    0.174127   0.140207   1.242    0.216    
## EthnoRace_C     0.117996   0.178041   0.663    0.509    
## Gender_0F_1M    0.083592   0.130791   0.639    0.524    
## Internalizing   0.176301   0.129938   1.357    0.177    
## pubc_mean       0.005813   0.104104   0.056    0.956    
## ALES_sum        0.012061   0.009424   1.280    0.203    
## cm1edu         -0.073627   0.049221  -1.496    0.137    
## m1b2            0.024669   0.127816   0.193    0.847    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.566 on 140 degrees of freedom
##   (33 observations deleted due to missingness)
## Multiple R-squared:  0.1568, Adjusted R-squared:  0.1026 
## F-statistic: 2.893 on 9 and 140 DF,  p-value: 0.003622
LBA10_act_mod = lm(Lamy_0035 ~ LAmy_BA10 + EthnoRace_AA + EthnoRace_C + Gender_0F_1M  + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data = clean.dataL)
lm.beta(LBA10_act_mod)
##     LAmy_BA10  EthnoRace_AA   EthnoRace_C  Gender_0F_1M Internalizing 
##  -0.326768500   0.132235389   0.070103193   0.069966237   0.123104466 
##     pubc_mean      ALES_sum        cm1edu          m1b2 
##   0.005741941   0.110948372  -0.124587967   0.016142258
summary(lm(LAmy_0011 ~ LAmy_BA10, data = clean.dataL))
## 
## Call:
## lm(formula = LAmy_0011 ~ LAmy_BA10, data = clean.dataL)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.05174 -0.18910 -0.04617  0.22286  1.09043 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.45078    0.03549  12.702   <2e-16 ***
## LAmy_BA10   -5.53465    1.93360  -2.862   0.0048 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3621 on 151 degrees of freedom
##   (30 observations deleted due to missingness)
## Multiple R-squared:  0.05147,    Adjusted R-squared:  0.04518 
## F-statistic: 8.193 on 1 and 151 DF,  p-value: 0.004803
summary(lm(Lamy_0003 ~ LAmy_BA10, data = clean.dataL))
## 
## Call:
## lm(formula = Lamy_0003 ~ LAmy_BA10, data = clean.dataL)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.43252 -0.23424 -0.03496  0.24835  1.22662 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.47800    0.03974   12.03  < 2e-16 ***
## LAmy_BA10   -6.47473    2.16536   -2.99  0.00326 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4055 on 151 degrees of freedom
##   (30 observations deleted due to missingness)
## Multiple R-squared:  0.0559, Adjusted R-squared:  0.04965 
## F-statistic: 8.941 on 1 and 151 DF,  p-value: 0.003257

Testing Residuals for Amygdala-BA10 model

mod2 = summary(lm(LAmy_BA10 ~ VE * Deprivation + EthnoRace_3cat + Gender_1F_2M + LAmy_BA11 + Internalizing + pubc_mean, data=clean.dataL))

plot(mod2$residuals)

Amygdala-BA11 Model

# No covariates.
summary(lm(LAmy_BA11 ~ VE * Deprivation, data = clean.dataL))
## 
## Call:
## lm(formula = LAmy_BA11 ~ VE * Deprivation, data = clean.dataL)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.020188 -0.015841 -0.009986  0.006083  0.092431 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     0.019927   0.001898  10.502   <2e-16 ***
## VE             -0.001851   0.004032  -0.459    0.647    
## Deprivation     0.001581   0.004754   0.333    0.740    
## VE:Deprivation -0.005120   0.004746  -1.079    0.282    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.02438 on 179 degrees of freedom
## Multiple R-squared:  0.01017,    Adjusted R-squared:  -0.006421 
## F-statistic: 0.6129 on 3 and 179 DF,  p-value: 0.6075
# Association between amygdala-BA11 connectivity and amygdala activation to threat faces.
cor.test(clean.dataL$Lamy_0035, clean.dataL$LAmy_BA11)
## 
##  Pearson's product-moment correlation
## 
## data:  clean.dataL$Lamy_0035 and clean.dataL$LAmy_BA11
## t = -3.4424, df = 151, p-value = 0.0007461
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.4108459 -0.1160426
## sample estimates:
##        cor 
## -0.2697536
# Including covariates.
summary(lm(Lamy_0035 ~ LAmy_BA11 + Internalizing + pubc_mean, data = clean.dataL))
## 
## Call:
## lm(formula = Lamy_0035 ~ LAmy_BA11 + Internalizing + pubc_mean, 
##     data = clean.dataL)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.61737 -0.38847 -0.04459  0.30089  1.51358 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    0.99552    0.26242   3.794 0.000215 ***
## LAmy_BA11     -6.31347    1.82545  -3.459 0.000708 ***
## Internalizing  0.14580    0.11004   1.325 0.187215    
## pubc_mean     -0.02731    0.07939  -0.344 0.731349    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5728 on 149 degrees of freedom
##   (30 observations deleted due to missingness)
## Multiple R-squared:  0.08401,    Adjusted R-squared:  0.06557 
## F-statistic: 4.555 on 3 and 149 DF,  p-value: 0.004387
actmod4 = lm(Lamy_0035 ~ LAmy_BA11 + Internalizing + pubc_mean, data = clean.dataL)
lm.beta(actmod4)
##     LAmy_BA11 Internalizing     pubc_mean 
##   -0.27197503    0.10412214   -0.02707385
summary(lm(Lamy_0035 ~ LAmy_BA11 + EthnoRace_C + EthnoRace_AA + Gender_0F_1M  + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data = clean.dataL))
## 
## Call:
## lm(formula = Lamy_0035 ~ LAmy_BA11 + EthnoRace_C + EthnoRace_AA + 
##     Gender_0F_1M + Internalizing + pubc_mean + ALES_sum + cm1edu + 
##     m1b2, data = clean.dataL)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.56844 -0.35610 -0.02711  0.27057  1.44881 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    0.542496   0.475775   1.140 0.256135    
## LAmy_BA11     -6.823881   1.867726  -3.654 0.000365 ***
## EthnoRace_C    0.109707   0.179681   0.611 0.542478    
## EthnoRace_AA   0.155514   0.141137   1.102 0.272410    
## Gender_0F_1M   0.164690   0.132415   1.244 0.215672    
## Internalizing  0.129310   0.129718   0.997 0.320555    
## pubc_mean      0.062969   0.105764   0.595 0.552559    
## ALES_sum       0.016969   0.009355   1.814 0.071815 .  
## cm1edu        -0.080555   0.049883  -1.615 0.108591    
## m1b2          -0.018202   0.130031  -0.140 0.888878    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5713 on 140 degrees of freedom
##   (33 observations deleted due to missingness)
## Multiple R-squared:  0.1407, Adjusted R-squared:  0.08551 
## F-statistic: 2.548 on 9 and 140 DF,  p-value: 0.009679
LBA11_act_mod = lm(Lamy_0035 ~ LAmy_BA11 + EthnoRace_C + EthnoRace_AA + Gender_0F_1M  + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data = clean.dataL)
lm.beta(LBA11_act_mod)
##     LAmy_BA11   EthnoRace_C  EthnoRace_AA  Gender_0F_1M Internalizing 
##   -0.29333960    0.06517835    0.11810029    0.13784408    0.09029230 
##     pubc_mean      ALES_sum        cm1edu          m1b2 
##    0.06219860    0.15609964   -0.13631212   -0.01191030
summary(lm(LAmy_0011 ~ LAmy_BA11, data = clean.dataL))
## 
## Call:
## lm(formula = LAmy_0011 ~ LAmy_BA11, data = clean.dataL)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.00472 -0.20670 -0.04196  0.23181  1.10276 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.43874    0.03791  11.574   <2e-16 ***
## LAmy_BA11   -2.24835    1.16695  -1.927   0.0559 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3673 on 151 degrees of freedom
##   (30 observations deleted due to missingness)
## Multiple R-squared:  0.02399,    Adjusted R-squared:  0.01753 
## F-statistic: 3.712 on 1 and 151 DF,  p-value: 0.0559
summary(lm(Lamy_0003 ~ LAmy_BA11, data = clean.dataL))
## 
## Call:
## lm(formula = Lamy_0003 ~ LAmy_BA11, data = clean.dataL)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.33227 -0.26554 -0.04716  0.27339  1.21842 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.49688    0.04157   11.95  < 2e-16 ***
## LAmy_BA11   -4.26201    1.27972   -3.33  0.00109 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.4028 on 151 degrees of freedom
##   (30 observations deleted due to missingness)
## Multiple R-squared:  0.06843,    Adjusted R-squared:  0.06226 
## F-statistic: 11.09 on 1 and 151 DF,  p-value: 0.00109

Testing Residuals for Amygdala-BA11 model

mod3 = summary(lm(LAmy_BA11 ~ VE * Deprivation + EthnoRace_3cat + Gender_1F_2M + LAmy_BA10 + Internalizing, data=clean.dataL))

plot(mod3$residuals)

Miscellaneous Demographics Checks

Puberty Parent vs. Child Report

Testing to see if puberty score was higher in parent report.

t.test(clean.data$pubc_mean ~ clean.data$used_pubp)
## 
##  Welch Two Sample t-test
## 
## data:  clean.data$pubc_mean by clean.data$used_pubp
## t = -0.92773, df = 5.7577, p-value = 0.3908
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.5740279  0.2607511
## sample estimates:
## mean in group 0 mean in group 1 
##        3.240584        3.397222

Great, they’re not different.

Compare the full sample with the included sample

full_puberty = read_csv('/Users/leighgoetschius/Box Sync/FF_Demographics/FullSample_Puberty.csv')
## Parsed with column specification:
## cols(
##   ff_id = col_double(),
##   puberty_score = col_double(),
##   used_parent = col_double(),
##   id_short = col_double()
## )
t.test(full_puberty$puberty_score, clean.data$pubc_mean)
## 
##  Welch Two Sample t-test
## 
## data:  full_puberty$puberty_score and clean.data$pubc_mean
## t = -0.14922, df = 394.16, p-value = 0.8815
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.1217439  0.1045666
## sample estimates:
## mean of x mean of y 
##  3.237131  3.245719
t.test(full_puberty$puberty_score, clean.dataL$pubc_mean)
## 
##  Welch Two Sample t-test
## 
## data:  full_puberty$puberty_score and clean.dataL$pubc_mean
## t = -0.33286, df = 392.68, p-value = 0.7394
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.13291183  0.09442298
## sample estimates:
## mean of x mean of y 
##  3.237131  3.256375
full_age = read.csv('/Users/leighgoetschius/Box Sync/FF_Demographics/Teen.age.csv')

t.test(full_age$Age_Years, clean.data$AgeYears)
## 
##  Welch Two Sample t-test
## 
## data:  full_age$Age_Years and clean.data$AgeYears
## t = 0.31929, df = 398.04, p-value = 0.7497
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.08601324  0.11936908
## sample estimates:
## mean of x mean of y 
##  15.86965  15.85297
t.test(full_age$Age_Years, clean.dataL$AgeYears)
## 
##  Welch Two Sample t-test
## 
## data:  full_age$Age_Years and clean.dataL$AgeYears
## t = 0.2993, df = 396.31, p-value = 0.7649
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.08753764  0.11897717
## sample estimates:
## mean of x mean of y 
##  15.86965  15.85393

Miscellaneous

Non-significant Regression Tables

RAmy_BA10_reg = lm(RAmy_BA10 ~ VE + Deprivation + ThreatDepInt + RAmy_BA47, data = clean.data)
apa.reg.table(RAmy_BA10_reg, filename = "RAmy_BA10_Table.doc", table.number = 5)
## 
## MBESS package needs to be installed to calculate R2 confidence intervals.
## 
## 
## Table 5 
## 
## Regression results using RAmy_BA10 as the criterion
##  
## 
##     Predictor      b      b_95%_CI  beta   beta_95%_CI sr2  sr2_95%_CI     r
##   (Intercept) 0.03**  [0.02, 0.04]                                          
##            VE   0.01 [-0.01, 0.02]  0.07 [-0.09, 0.24] .00 [-.01, .02]   .02
##   Deprivation   0.00 [-0.01, 0.02]  0.04 [-0.13, 0.21] .00 [-.01, .01]   .01
##  ThreatDepInt  -0.02 [-0.03, 0.00] -0.16 [-0.32, 0.01] .02 [-.02, .05] -.15*
##     RAmy_BA47 0.15**  [0.07, 0.23]  0.27  [0.13, 0.41] .07  [.00, .14] .30**
##                                                                             
##                                                                             
##                                                                             
##            Fit
##               
##               
##               
##               
##               
##    R2 = .107**
##  95% CI[NA,NA]
##               
## 
## Note. A significant b-weight indicates the beta-weight and semi-partial correlation are also significant.
## b represents unstandardized regression weights. beta indicates the standardized regression weights. 
## sr2 represents the semi-partial correlation squared. r represents the zero-order correlation.
## Square brackets are used to enclose the lower and upper limits of a confidence interval.
## * indicates p < .05. ** indicates p < .01.
## 
lm.beta(RAmy_BA10_reg)
##           VE  Deprivation ThreatDepInt    RAmy_BA47 
##   0.07072681   0.03926044  -0.15871285   0.27121381
summary(RAmy_BA10_reg)
## 
## Call:
## lm(formula = RAmy_BA10 ~ VE + Deprivation + ThreatDepInt + RAmy_BA47, 
##     data = clean.data)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.067036 -0.030903 -0.008152  0.018446  0.120935 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   0.034716   0.005148   6.743 2.09e-10 ***
## VE            0.005491   0.006488   0.846 0.398551    
## Deprivation   0.003235   0.007216   0.448 0.654496    
## ThreatDepInt -0.015010   0.007951  -1.888 0.060683 .  
## RAmy_BA47     0.149326   0.039804   3.752 0.000238 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.03958 on 178 degrees of freedom
## Multiple R-squared:  0.1067, Adjusted R-squared:  0.08667 
## F-statistic: 5.318 on 4 and 178 DF,  p-value: 0.0004551
LAmy_BA10_reg = lm(LAmy_BA10 ~ VE + Deprivation + ThreatDepInt + LAmy_BA11, data = clean.dataL)

lm.beta(LAmy_BA10_reg)
##           VE  Deprivation ThreatDepInt    LAmy_BA11 
##   0.02637087   0.01286257  -0.06424797   0.61032230
summary(LAmy_BA10_reg)
## 
## Call:
## lm(formula = LAmy_BA10 ~ VE + Deprivation + ThreatDepInt + LAmy_BA11, 
##     data = clean.dataL)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.027573 -0.004216 -0.002333  0.000593  0.055848 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   0.0030810  0.0012229   2.519   0.0126 *  
## VE            0.0007613  0.0020454   0.372   0.7102    
## Deprivation   0.0004249  0.0024110   0.176   0.8603    
## ThreatDepInt -0.0022878  0.0024140  -0.948   0.3445    
## LAmy_BA11     0.3900709  0.0378926  10.294   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.01236 on 178 degrees of freedom
## Multiple R-squared:  0.3807, Adjusted R-squared:  0.3668 
## F-statistic: 27.35 on 4 and 178 DF,  p-value: < 2.2e-16
LAmy_BA11_reg = lm(LAmy_BA11 ~ VE + Deprivation + ThreatDepInt + LAmy_BA10, data = clean.dataL)

lm.beta(LAmy_BA11_reg)
##           VE  Deprivation ThreatDepInt    LAmy_BA10 
##  -0.04180465   0.01131408  -0.01831956   0.61143137
summary(LAmy_BA11_reg)
## 
## Call:
## lm(formula = LAmy_BA11 ~ VE + Deprivation + ThreatDepInt + LAmy_BA10, 
##     data = clean.dataL)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.046114 -0.009221 -0.005651  0.004268  0.083652 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   0.0095433  0.0018130   5.264 4.03e-07 ***
## VE           -0.0018883  0.0032013  -0.590    0.556    
## Deprivation   0.0005848  0.0037758   0.155    0.877    
## ThreatDepInt -0.0010207  0.0037892  -0.269    0.788    
## LAmy_BA10     0.9566727  0.0929340  10.294  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.01935 on 178 degrees of freedom
## Multiple R-squared:  0.3795, Adjusted R-squared:  0.3656 
## F-statistic: 27.22 on 4 and 178 DF,  p-value: < 2.2e-16

Checking Threat/Dep Correlation

cor.test(clean.data$VE, clean.data$Deprivation)
## 
##  Pearson's product-moment correlation
## 
## data:  clean.data$VE and clean.data$Deprivation
## t = 7.6865, df = 181, p-value = 9.272e-13
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.3782395 0.5980962
## sample estimates:
##       cor 
## 0.4960782
fit_cor = lm(RAmy_BA47 ~ VE + Deprivation, data = clean.data)
vif(fit_cor)
##          VE Deprivation 
##    1.326425    1.326425
par(family = 'serif')
plot(clean.data$VE, clean.data$Deprivation, frame.plot = FALSE,  main=NULL, cex.lab = 1.5, font.lab=2, ylab = "Social Deprivation \n (Z-Score)", xlab = "Violence Exposure \n (Z-Score)", pch=16)

clean.data %>%
  ggplot(aes(x=VE, y=Deprivation)) +
  geom_point(size=3) + 
  labs(x="Violence Exposure \n (Z-Score)", y="Social Deprivation \n (Z-Score)") +
  theme_classic() +
  theme(text=element_text(size=20, family="serif", face="bold" ))

DCN R&R

movement=read_csv('/Users/leighgoetschius/Box Sync/ThreatDep_Probtrack_Amygdala/dMRI_Outliers_Translation_Rotation.csv')
## Parsed with column specification:
## cols(
##   ID = col_character(),
##   ID_2 = col_character(),
##   `x-tr` = col_double(),
##   `y-tr` = col_double(),
##   `z-tr` = col_double(),
##   `x-rot` = col_double(),
##   `y-rot` = col_double(),
##   `z-rot` = col_double(),
##   Outliers_Num = col_double(),
##   `Outliers/Slices` = col_double(),
##   Outliers_Perc = col_double()
## )
movement$ID=as.integer(movement$ID)
clean.data = clean.data %>% 
  left_join(movement)
## Joining, by = "ID"
clean.data %>% 
  summarize(mean_out=mean(Outliers_Perc, na.rm=TRUE), mean_xrot = mean(`x-rot`, na.rm=TRUE),mean_yrot = mean(`y-rot`, na.rm=TRUE), mean_zrot = mean(`z-rot`, na.rm=TRUE),mean_xtrans = mean(`x-tr`, na.rm=TRUE), mean_ytrans = mean(`y-tr`, na.rm=TRUE),mean_ztrans = mean(`z-tr`, na.rm=TRUE))
mean_outmean_xrotmean_yrotmean_zrotmean_xtransmean_ytransmean_ztrans
0.6140.002340.00417-0.113-0.0238-0.00582-0.0066
clean.data %>% 
  summarize(sd_out=sd(Outliers_Perc, na.rm=TRUE), sd_xrot = sd(`x-rot`, na.rm=TRUE),sd_yrot = sd(`y-rot`, na.rm=TRUE), sd_zrot = sd(`z-rot`, na.rm=TRUE),sd_xtrans = sd(`x-tr`, na.rm=TRUE), sd_ytrans = sd(`y-tr`, na.rm=TRUE),sd_ztrans = sd(`z-tr`, na.rm=TRUE))
sd_outsd_xrotsd_yrotsd_zrotsd_xtranssd_ytranssd_ztrans
0.6470.3730.140.1650.160.130.297

Test of Hierarchical Model where VExSD are added to the model to see if they are accounting for significantly more variance

onlycovs = lm(RAmy_BA47 ~ EthnoRace_C + EthnoRace_AA + Gender_0F_1M + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data=clean.data)

maineffects = lm(RAmy_BA47 ~ VE + Deprivation + EthnoRace_C + EthnoRace_AA + Gender_0F_1M  + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data=clean.data)

winteraction = lm(RAmy_BA47 ~ VE + Deprivation + I(VE*Deprivation) + EthnoRace_C + EthnoRace_AA + Gender_0F_1M  + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data=clean.data)

anova(onlycovs, maineffects, winteraction)
Res.DfRSSDfSum of SqFPr(>F)
1700.991                
1680.99 20.00110.09710.907  
1670.94310.04668.25  0.00461
apa.reg.table(onlycovs, maineffects, winteraction, filename = "HierarchicalTable_BA47.doc", table.number = 9)
onlycovs_10 = lm(RAmy_BA10 ~ EthnoRace_C + EthnoRace_AA + Gender_0F_1M + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data=clean.data)

maineffects_10 = lm(RAmy_BA10 ~ VE + Deprivation + EthnoRace_C + EthnoRace_AA + Gender_0F_1M  + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data=clean.data)

winteraction_10 = lm(RAmy_BA10 ~ VE + Deprivation + I(VE*Deprivation) + EthnoRace_C + EthnoRace_AA + Gender_0F_1M  + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data=clean.data)

anova(onlycovs_10, maineffects_10, winteraction_10)
Res.DfRSSDfSum of SqFPr(>F)
1700.275               
1680.27420.000740.2290.795 
1670.26910.004652.89 0.0912
apa.reg.table(onlycovs_10, maineffects_10, winteraction_10, filename = "HierarchicalTable_RBA10.doc", table.number = 9)
maineffects_L10 = lm(LAmy_BA10 ~ VE + Deprivation, data=clean.dataL)

winteraction_L10 = lm(LAmy_BA10 ~ VE + Deprivation + I(VE*Deprivation), data=clean.dataL)

anova(maineffects_L10, winteraction_L10)
Res.DfRSSDfSum of SqFPr(>F)
1800.0439           
1790.043410.00048420.159
maineffects_L11 = lm(LAmy_BA11 ~ VE + Deprivation, data=clean.dataL)

winteraction_L11 = lm(LAmy_BA11 ~ VE + Deprivation + I(VE*Deprivation), data=clean.dataL)

anova(maineffects_L11, winteraction_L11)
Res.DfRSSDfSum of SqFPr(>F)
1800.107              
1790.10610.0006921.160.282
apa.reg.table(maineffects_L10, winteraction_L10, filename = "HierarchicalTable_LBA10.doc", table.number = 9)

apa.reg.table(maineffects_L11, winteraction_L11, filename = "HierarchicalTable_LBA11.doc", table.number = 9)

More interaction parsing

clean.data %>% 
  filter(DepComp>.77) %>% 
  summarize(meanVE = mean(ThreatComp), minVE = min(ThreatComp), maxVE = max(ThreatComp), n=n())

meanVEminVEmaxVEn
0.8360.00222.1613
In this dataset, it looks like in people with high social deprivation, the average violence exposure is pretty high, but not exclusively high. There’s some violence that’s at about mean levels.

clean.data %>% 
  filter(ThreatComp<.22) %>% 
  summarize(meanSD = mean(DepComp), minSD = min(DepComp), maxSD = max(DepComp), n=n())
meanSDminSDmaxSDn
-0.0933-0.7681.13125
pubertal_correlations = clean.data %>% dplyr::select(VE, Deprivation, pubc_mean)

apa.cor.table(pubertal_correlations, filename = "Puberty_Environment_Cortable.doc", table.number = 1)
## 
## 
## Table 1 
## 
## Means, standard deviations, and correlations with confidence intervals
##  
## 
##   Variable       M    SD   1            2          
##   1. VE          0.04 0.53                         
##                                                    
##   2. Deprivation 0.03 0.50 .50**                   
##                            [.38, .60]              
##                                                    
##   3. pubc_mean   3.25 0.58 -.19**       -.10       
##                            [-.33, -.05] [-.24, .05]
##                                                    
## 
## Note. M and SD are used to represent mean and standard deviation, respectively.
## Values in square brackets indicate the 95% confidence interval.
## The confidence interval is a plausible range of population correlations 
## that could have caused the sample correlation (Cumming, 2014).
## * indicates p < .05. ** indicates p < .01.
## 
composites_by_age = read_csv('/Volumes/csmonk/csmonk-lab/Data/Fragile_Families_Longitudinal/Leigh_FFCWS/ThreatDepVarsSANDonlyZ053018.csv')
## Parsed with column specification:
## cols(
##   .default = col_double(),
##   m3e24 = col_logical(),
##   hv5_dsae = col_character(),
##   hv5_ppvtae = col_character(),
##   m5d22d = col_logical(),
##   Age5_Threat = col_character(),
##   Age9_Dep = col_character()
## )
## See spec(...) for full column specifications.
clean.data = clean.data %>% 
  left_join(composites_by_age)
## Joining, by = c("ID", "ThreatZSum", "ThreatComp", "DepZSum", "DepComp", "cm1edu", "m1b2")
age_threat = clean.data %>% 
  dplyr::select('Age3_Threat','Age5_Threat','Age9_Threat') %>% 
  mutate(Age3_Threat = na_if(Age3_Threat,NA)) %>% 
  mutate(Age5_Threat = na_if(Age5_Threat,NA)) %>% 
  mutate(Age9_Threat = na_if(Age9_Threat,NA))

age_threat$Age5_Threat = as.numeric(age_threat$Age5_Threat)

age_dep = clean.data %>% 
  dplyr::select('Age3_Dep','Age5_Dep','Age9_Dep') %>% 
  mutate(Age3_Dep = na_if(Age3_Dep,NA)) %>% 
  mutate(Age5_Dep = na_if(Age5_Dep,NA)) %>% 
  mutate(Age9_Dep = na_if(Age9_Dep,NA))

age_dep$Age9_Dep = as.numeric(age_dep$Age9_Dep)
cor(age_threat, use = "pairwise.complete.obs")
##             Age3_Threat Age5_Threat Age9_Threat
## Age3_Threat          NA          NA          NA
## Age5_Threat          NA          NA          NA
## Age9_Threat          NA          NA          NA
cor(age_dep, use = "pairwise.complete.obs")
##          Age3_Dep Age5_Dep Age9_Dep
## Age3_Dep       NA       NA       NA
## Age5_Dep       NA       NA       NA
## Age9_Dep       NA       NA       NA

Test of Regions Not Originally in Paper but were in Preregistration

# Right Hemisphere

summary(lm(RAmy_BA11 ~ VE + Deprivation + I(VE*Deprivation), data = clean.data))
## 
## Call:
## lm(formula = RAmy_BA11 ~ VE + Deprivation + I(VE * Deprivation), 
##     data = clean.data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.08458 -0.05620 -0.01290  0.04266  0.21915 
## 
## Coefficients:
##                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)          0.080773   0.005348  15.104   <2e-16 ***
## VE                  -0.013152   0.011289  -1.165    0.246    
## Deprivation          0.005238   0.012474   0.420    0.675    
## I(VE * Deprivation) -0.011506   0.013574  -0.848    0.398    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.06886 on 179 degrees of freedom
## Multiple R-squared:  0.01665,    Adjusted R-squared:  0.0001711 
## F-statistic:  1.01 on 3 and 179 DF,  p-value: 0.3895
RAmy_BA11  = lm(RAmy_BA11 ~ VE + Deprivation, data = clean.data)
RAmy_BA11_wInt = lm(RAmy_BA11 ~ VE + Deprivation + I(VE*Deprivation), data = clean.data)
lm.beta(RAmy_BA11_wInt)
##                  VE         Deprivation I(VE * Deprivation) 
##         -0.10187108          0.03822909         -0.07315476
summary(lm(RAmy_BA25 ~ VE + Deprivation + I(VE*Deprivation), data = clean.data))
## 
## Call:
## lm(formula = RAmy_BA25 ~ VE + Deprivation + I(VE * Deprivation), 
##     data = clean.data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.09522 -0.06181 -0.01597  0.04302  0.21800 
## 
## Coefficients:
##                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)          0.085995   0.005579  15.414   <2e-16 ***
## VE                  -0.012121   0.011778  -1.029    0.305    
## Deprivation         -0.003770   0.013014  -0.290    0.772    
## I(VE * Deprivation)  0.007301   0.014162   0.516    0.607    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.07184 on 179 degrees of freedom
## Multiple R-squared:  0.008866,   Adjusted R-squared:  -0.007745 
## F-statistic: 0.5337 on 3 and 179 DF,  p-value: 0.6597
RAmy_BA25  = lm(RAmy_BA25 ~ VE + Deprivation, data = clean.data)
RAmy_BA25_wInt  = lm(RAmy_BA25 ~ VE + Deprivation + I(VE*Deprivation), data = clean.data)
lm.beta(RAmy_BA25_wInt)
##                  VE         Deprivation I(VE * Deprivation) 
##         -0.09034401         -0.02647541          0.04466875
# Left Hemisphere

summary(lm(LAmy_BA47 ~ VE + Deprivation + I(VE*Deprivation), data = clean.dataL))
## 
## Call:
## lm(formula = LAmy_BA47 ~ VE + Deprivation + I(VE * Deprivation), 
##     data = clean.dataL)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.025113 -0.017921 -0.009307  0.008469  0.093179 
## 
## Coefficients:
##                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)          0.023064   0.001962  11.757   <2e-16 ***
## VE                  -0.003978   0.004183  -0.951    0.343    
## Deprivation          0.005107   0.004902   1.042    0.299    
## I(VE * Deprivation) -0.001501   0.004895  -0.307    0.760    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.02514 on 178 degrees of freedom
##   (1 observation deleted due to missingness)
## Multiple R-squared:  0.008092,   Adjusted R-squared:  -0.008626 
## F-statistic: 0.484 on 3 and 178 DF,  p-value: 0.6938
LAmy_BA47 = lm(LAmy_BA47 ~ VE + Deprivation, data = clean.dataL)
LAmy_BA47_wInt = lm(LAmy_BA47 ~ VE + Deprivation + I(VE*Deprivation), data = clean.dataL)
lm.beta(LAmy_BA47_wInt)
##                  VE         Deprivation I(VE * Deprivation) 
##         -0.08515547          0.09608236         -0.02621534
summary(lm(LAmy_BA25 ~ VE + Deprivation + I(VE*Deprivation), data = clean.dataL))
## 
## Call:
## lm(formula = LAmy_BA25 ~ VE + Deprivation + I(VE * Deprivation), 
##     data = clean.dataL)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.08471 -0.04763 -0.01358  0.03971  0.20725 
## 
## Coefficients:
##                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)          0.084960   0.004978  17.067   <2e-16 ***
## VE                   0.002105   0.010614   0.198    0.843    
## Deprivation          0.001036   0.012441   0.083    0.934    
## I(VE * Deprivation) -0.003052   0.012422  -0.246    0.806    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.06379 on 178 degrees of freedom
##   (1 observation deleted due to missingness)
## Multiple R-squared:  0.0005228,  Adjusted R-squared:  -0.01632 
## F-statistic: 0.03104 on 3 and 178 DF,  p-value: 0.9926
LAmy_BA25 = lm(LAmy_BA25 ~ VE + Deprivation, data = clean.dataL)
LAmy_BA25_wInt = lm(LAmy_BA25 ~ VE + Deprivation + I(VE*Deprivation), data = clean.dataL)
lm.beta(LAmy_BA25_wInt)
##                  VE         Deprivation I(VE * Deprivation) 
##         0.017822895         0.007708382        -0.021090789
apa.reg.table(RAmy_BA25, RAmy_BA25_wInt, filename = "RAmy_BA25.doc")
apa.reg.table(RAmy_BA11, RAmy_BA11_wInt, filename = "RAmy_BA11.doc")
apa.reg.table(LAmy_BA47, LAmy_BA47_wInt, filename = "LAmy_BA47.doc")
apa.reg.table(LAmy_BA25, LAmy_BA25_wInt, filename = "LAmy_BA25.doc")
R_BA25 = lm(Ramy_0035 ~ RAmy_BA25, data = clean.data)
summary(R_BA25)
## 
## Call:
## lm(formula = Ramy_0035 ~ RAmy_BA25, data = clean.data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.81996 -0.40831 -0.01758  0.36648  2.03376 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.92330    0.08624  10.706   <2e-16 ***
## RAmy_BA25   -1.01239    0.76621  -1.321    0.188    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.6687 on 150 degrees of freedom
##   (31 observations deleted due to missingness)
## Multiple R-squared:  0.0115, Adjusted R-squared:  0.004915 
## F-statistic: 1.746 on 1 and 150 DF,  p-value: 0.1884
lm.beta(R_BA25)
##  RAmy_BA25 
## -0.1072604
R_BA11 = lm(Ramy_0035 ~ RAmy_BA11, data = clean.data)
summary(R_BA11)
## 
## Call:
## lm(formula = Ramy_0035 ~ RAmy_BA11, data = clean.data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.81165 -0.39542  0.00652  0.33398  1.99924 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.91841    0.08264  11.113   <2e-16 ***
## RAmy_BA11   -1.02656    0.76482  -1.342    0.182    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.6685 on 150 degrees of freedom
##   (31 observations deleted due to missingness)
## Multiple R-squared:  0.01187,    Adjusted R-squared:  0.005281 
## F-statistic: 1.802 on 1 and 150 DF,  p-value: 0.1815
lm.beta(R_BA11)
##  RAmy_BA11 
## -0.1089407
L_BA25 = lm(Lamy_0035 ~ LAmy_BA25, data = clean.dataL)
summary(L_BA25)
## 
## Call:
## lm(formula = Lamy_0035 ~ LAmy_BA25, data = clean.dataL)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.57095 -0.36529 -0.00887  0.34635  1.51291 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.80057    0.08228    9.73   <2e-16 ***
## LAmy_BA25   -0.21028    0.74981   -0.28     0.78    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5962 on 150 degrees of freedom
##   (31 observations deleted due to missingness)
## Multiple R-squared:  0.000524,   Adjusted R-squared:  -0.006139 
## F-statistic: 0.07865 on 1 and 150 DF,  p-value: 0.7795
lm.beta(L_BA25)
##   LAmy_BA25 
## -0.02289203
L_BA47 = lm(Lamy_0035 ~ LAmy_BA47, data = clean.dataL)
summary(L_BA47)
## 
## Call:
## lm(formula = Lamy_0035 ~ LAmy_BA47, data = clean.dataL)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.46503 -0.37811 -0.03862  0.31208  1.43264 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.87819    0.06522  13.466   <2e-16 ***
## LAmy_BA47   -3.93475    1.81993  -2.162   0.0322 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5873 on 150 degrees of freedom
##   (31 observations deleted due to missingness)
## Multiple R-squared:  0.03022,    Adjusted R-squared:  0.02376 
## F-statistic: 4.674 on 1 and 150 DF,  p-value: 0.0322
lm.beta(L_BA47)
##  LAmy_BA47 
## -0.1738414
cor.test(clean.data$RAmy_BA25, clean.data$Internalizing)
## 
##  Pearson's product-moment correlation
## 
## data:  clean.data$RAmy_BA25 and clean.data$Internalizing
## t = 1.1147, df = 181, p-value = 0.2665
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.06324483  0.22493191
## sample estimates:
##        cor 
## 0.08256932
cor.test(clean.data$RAmy_BA11, clean.data$Internalizing)
## 
##  Pearson's product-moment correlation
## 
## data:  clean.data$RAmy_BA11 and clean.data$Internalizing
## t = 0.004456, df = 181, p-value = 0.9964
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1447324  0.1453809
## sample estimates:
##          cor 
## 0.0003312119
cor.test(clean.dataL$LAmy_BA25, clean.dataL$Internalizing)
## 
##  Pearson's product-moment correlation
## 
## data:  clean.dataL$LAmy_BA25 and clean.dataL$Internalizing
## t = 0.93681, df = 180, p-value = 0.3501
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.07657513  0.21295419
## sample estimates:
##        cor 
## 0.06965627
cor.test(clean.dataL$LAmy_BA47, clean.dataL$Internalizing)
## 
##  Pearson's product-moment correlation
## 
## data:  clean.dataL$LAmy_BA47 and clean.dataL$Internalizing
## t = 0.58866, df = 180, p-value = 0.5568
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1022735  0.1880904
## sample estimates:
##       cor 
## 0.0438341

Remove two participants who do not have full coverage but greater than 70% coverage

clean.data_test = clean.data %>% dplyr::filter(ID != 10058 & ID != 10078)

summary(lm(RAmy_BA47 ~ VE * Deprivation + EthnoRace_C + EthnoRace_AA + Gender_0F_1M  + Internalizing + pubc_mean + ALES_sum + cm1edu + m1b2, data=clean.data_test))
## 
## Call:
## lm(formula = RAmy_BA47 ~ VE * Deprivation + EthnoRace_C + EthnoRace_AA + 
##     Gender_0F_1M + Internalizing + pubc_mean + ALES_sum + cm1edu + 
##     m1b2, data = clean.data_test)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.11960 -0.05615 -0.02171  0.05212  0.22094 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)   
## (Intercept)     0.139351   0.058596   2.378  0.01854 * 
## VE              0.009690   0.013338   0.727  0.46853   
## Deprivation     0.019455   0.014286   1.362  0.17512   
## EthnoRace_C     0.014750   0.023429   0.630  0.52985   
## EthnoRace_AA   -0.008021   0.018362  -0.437  0.66282   
## Gender_0F_1M    0.007554   0.015310   0.493  0.62240   
## Internalizing   0.017022   0.015465   1.101  0.27264   
## pubc_mean       0.004296   0.012612   0.341  0.73380   
## ALES_sum       -0.001296   0.001148  -1.128  0.26076   
## cm1edu         -0.003334   0.006197  -0.538  0.59127   
## m1b2           -0.016136   0.015495  -1.041  0.29921   
## VE:Deprivation -0.044946   0.015589  -2.883  0.00446 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.07526 on 166 degrees of freedom
##   (3 observations deleted due to missingness)
## Multiple R-squared:  0.06965,    Adjusted R-squared:  0.008 
## F-statistic:  1.13 on 11 and 166 DF,  p-value: 0.3412